{template 'common/header'}
<div class='container' style='padding:0 5px 10px;margin:0;width:100%'>

<div class="panel panel-success">
  <div class="panel-heading">常用工具 > 用户积分表</div>
</div>

	<form id="form2" class="form-horizontal" method="post">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
				<th style="width:60px;">全选</th>
          			<th style="width:100px;">用户名</th>
          			<th style="width:150px;">手机号</th>
          			<th style="width:400px;">积分</th>
					<th style="min-width:60px;width:100px;">删除</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $item}
				<td><input type="checkbox" value="{$item['uid']}" name="delete[]"></td>
					<td>{$item['name']}</td>
					<td>{$item['tel']}</td>
					<td>{$item['total_cent']}</td>
					<td>
					<a onclick="if(confirm('此操作不可恢复，确认吗？')){location.href='{php echo $this->createWebUrl('cent', array('uid' => $item['uid'],'op'=>'del'))}'}" href="javascript:;" title="删除" class="btn btn-xs btn-danger"><span class="icon icon-close">删除</span></a>
					</td>				
				</tr>
				
				{/loop}
				<tr >
				<td><input type="checkbox"  onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});" name=''>    <input class="btn btn-primary btn-xs" type="submit" value="删除" name="submit" ></td><td></td><td></td><td></td>
				</tr>
			</tbody>
		</table>
		<input type="hidden" value="cent" name="do">
		<input type="hidden" value="del" name="op">
		<input type="hidden" name="token" value="{$_W['token']}" />
		
	</form>
	{$pager}

	<script>
		$(function(){
			$('.pagination').removeClass().children().addClass('pagination');

		})
	</script>
	<script>
		$('#form2').submit(function(){
			if($(":checkbox[name='delete[]']:checked").size() > 0){
				return confirm('删除后不可恢复，您确定删除吗？');
			}
			return false;
		}); 
	</script>	
	</div>
		
</div>

{template 'common/footer'}
